﻿@using Smartstore.Admin.Models.Affiliates

@model AffiliateModel.AffiliatedOrderModel

<datagrid id="order-grid" class="h-100" allow-resize="true" allow-column-reordering="true">
    <datasource read="@Url.Action("AffiliatedOrderList", "Affiliate", new { affiliateId = ViewData["AffiliateId"] })" />
    <sorting enabled="true">
        <sort by="CreatedOn" by-entity-member="CreatedOnUtc" descending="true" />
    </sorting>
    <paging position="Bottom" show-size-chooser="true" />
    <columns>
        <column for="Id" hideable="false" type="string">
            <display-template>
                <a :href="item.row.EditUrl" class="text-truncate">
                    {{ item.value }}
                </a>
            </display-template>
        </column>
        <column for="OrderStatus" entity-member="OrderStatusId" />
        <column for="PaymentStatus" entity-member="PaymentStatusId" />
        <column for="ShippingStatus" entity-member="ShippingStatusId" />
        <column for="CreatedOn" entity-member="CreatedOnUtc" />
        <column for="OrderTotal" halign="flex-end" />
    </columns>
    <row-commands>
        <a datarow-action="DataRowAction.Custom" :href="item.row.EditUrl">@T("Admin.Common.View")</a>
    </row-commands>
</datagrid> 